<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.global.js"></script>
</head>

<body>
    <div id="app">
        <a v-bind:[attributename]="url">点我</a>
        <div v-on:[eventname]="doSomething">00944</div>
    </div>

    <script>
        Vue.createApp({
            data(){
                return {
                    attributename:"href",
                    url:"https://www.baidu.com",
                    // eventname:"click"
                    eventname:"dblclick"
                }
            },
            methods:{
                doSomething(){
                    alert("fuck off")
                }
            }
        }).mount("#app")
    </script>
</body>

</html>